Skip to content

feat: Add lang list and lang dump commands#320

Merged
zharinov merged 1 commit intomasterfrom
feat/lang-dump
Jan 9, 2026
Merged

feat: Add lang list and lang dump commands#320
zharinov merged 1 commit intomasterfrom
feat/lang-dump

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 9, 2026

Summary

  • Replace plotnik langs with plotnik lang subcommand structure
  • Add plotnik lang list to show languages with their aliases
  • Add plotnik lang dump <lang> to dump grammar in Plotnik-like syntax

Why

LLMs and humans need to understand grammar structure to write queries. The dump uses familiar Plotnik syntax ({} for sequences, [] for choices, ?*+ quantifiers) making it easy to learn how to query a language.

Notes

  • Hidden rules rendered as (_hidden_rule ...) to indicate they're not directly queryable
  • Aliases shown with IMMEDIATE_TOKEN ! suffix
  • Supertypes annotated with :: supertype
  • Header comment explains the syntax

@zharinov zharinov force-pushed the feat/lang-dump branch 3 times, most recently from dc2592a to a10505d Compare January 9, 2026 18:55
@zharinov zharinov enabled auto-merge (squash) January 9, 2026 19:15
@zharinov zharinov disabled auto-merge January 9, 2026 19:15
@zharinov zharinov merged commit f93fb92 into master Jan 9, 2026
3 checks passed
@zharinov zharinov deleted the feat/lang-dump branch January 9, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant